#include<iostream>
#include<cstring> 
using namespace std;





int main()
{
	int t ;
	cin >> t;
	while(t--)
	{
		char a[200010] = { 0 };
		char b[200010] = { 0 };
		int c[3] = { 0 };
		int n, k;
		cin >> n >> k;
		cin >> a;
		
		int i = 0;
		while(a[i])
		{
			c[(a[i] - 48)]++;
			i++;
		}
		for (int j = 0; j < n;j++)
		{
			b[j] = '+';
		}
		int e = 0; int w = 0;
		for(e = 0; e < c[0] ;e++)
		{
			b[e] = '-';
		}
		for(w = 0; w < c[1] ;w++)
		{
			b[n-1-w] = '-';
		}
		for(int j = 0; j < c[2] ;j++)
		{
			b[e + j] = '?';
			b[n - 1 - w - j] = '?';
			
		}
		cout << b << endl;
	}
	

	return 0;
}
